package com.chenjie.executor.day08;

/**
 * 自定义task
 */
public class Task implements Runnable {
    @Override
    public void run() {
        while (true) {
            Thread thread = Thread.currentThread();
            boolean interrupted = thread.isInterrupted();
            if(interrupted){
                break;
            };
            System.out.println(thread.isInterrupted());
        }
    }
}
